﻿@model SILAS.UI.ViewModels.SectorViewModel


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Ruta</legend>

        <table>
            @Html.HiddenFor(model => model.ruta.Id)
        <tr>
          <td width="100">@Html.Label("Desde")</td>
          <td width="365">
          @Html.EditorFor(model => model.ruta.Desde)
          @Html.ValidationMessageFor(model => model.ruta.Desde)
          
        </tr>
        
       <tr>
           
            <td>@Html.Label("Hasta")</td>
        
            <td>@Html.EditorFor(model => model.ruta.Hasta)
            @Html.ValidationMessageFor(model => model.ruta.Hasta)</td>
   
        </tr>
        
        <tr>
          <td>@Html.Label("Tipo Via")</td>
          <td>
             @Html.DropDownList("IdTipoVia")
             @Html.ValidationMessageFor(model => model.ruta.TipoVia.Descripcion)</td>
        </tr>
        
        <tr>
          <td> @Html.Label("Medio Transporte")</td>
          <td>
             @Html.DropDownList("IdMedioTransp")
            @Html.ValidationMessageFor(model => model.ruta.MedioTransporte.Descripcion)</td>
        </tr>
        
        <tr>
          <td>@Html.Label("Distancia")</td>
          <td>@Html.EditorFor(model => model.ruta.Distancia) (Kms)
            @Html.ValidationMessageFor(model => model.ruta.Distancia)</td>
            
        </tr>
        
        <tr>
          <td>@Html.Label("Tiempo")</td>
          <td>
             @Html.EditorFor(model => model.ruta.Tiempo) (Hrs)
            @Html.ValidationMessageFor(model => model.ruta.Tiempo)</td>
        </tr>
        
        <div class="editor-label">
            @Html.HiddenFor(model => model.ruta.IdSector)
        </div>
        
        
        </table>

        <br />
        <div>
        <button id="btnAgregar">Agregar Ruta</button>
        </div>

    </fieldset>
}


